import {NgModule} from "@angular/core";
import {RouterModule, Routes} from "@angular/router";
import {SharedModule} from "../../shared/shared.module";

import {TestOptListComponent} from "./testOpt-list/testOpt-list.component";
import {TestOptDetailComponent} from "./testOpt-detail/testOpt-detail.component";
import {TestOptEditComponent} from "./testOpt-edit/testOpt-edit.component";
import {TestOptionListComponent} from "./testOption-list/testOption-list.component";
import {TestOptionDetailComponent} from "./testOption-detail/testOption-detail.component";
import {TestOptionEditComponent} from "./testOption-edit/testOption-edit.component";
import {TestRecordListComponent} from "./testRecord-list/testRecord-list.component";
import {TestRecordDetailComponent} from "./testRecord-detail/testRecord-detail.component";
import {TestRecordEditComponent} from "./testRecord-edit/testRecord-edit.component";
import {TestUnitListComponent} from "./testUnit-list/testUnit-list.component";
import {TestUnitDetailComponent} from "./testUnit-detail/testUnit-detail.component";
import {TestUnitEditComponent} from "./testUnit-edit/testUnit-edit.component";

const routes: Routes = [
  {path: '', redirectTo: ' testOpt'},
    {
      path: 'testOpt', children: [
        {path: '', redirectTo: 'list'},
        {path: 'list', component: TestOptListComponent},
        {path: 'add', component: TestOptEditComponent},
        {path: 'modify/:code', component: TestOptEditComponent},
        {path: 'detail/:code', component: TestOptDetailComponent}
        ]
      },
    {
      path: 'testOption', children: [
        {path: '', redirectTo: 'list'},
        {path: 'list', component: TestOptionListComponent},
        {path: 'add', component: TestOptionEditComponent},
        {path: 'modify/:code', component: TestOptionEditComponent},
        {path: 'detail/:code', component: TestOptionDetailComponent}
        ]
      },
    {
      path: 'testRecord', children: [
        {path: '', redirectTo: 'list'},
        {path: 'list', component: TestRecordListComponent},
        {path: 'add', component: TestRecordEditComponent},
        {path: 'modify/:code', component: TestRecordEditComponent},
        {path: 'detail/:code', component: TestRecordDetailComponent}
        ]
      },
    {
      path: 'testUnit', children: [
        {path: '', redirectTo: 'list'},
        {path: 'list', component: TestUnitListComponent},
        {path: 'add', component: TestUnitEditComponent},
        {path: 'modify/:code', component: TestUnitEditComponent},
        {path: 'detail/:code', component: TestUnitDetailComponent}
        ]
      }
]

@NgModule({
  imports: [
    SharedModule.forRoot(),
    RouterModule.forChild(routes)
  ],
  declarations: [
    TestOptListComponent,
    TestOptDetailComponent,
    TestOptEditComponent,
    TestOptionListComponent,
    TestOptionDetailComponent,
    TestOptionEditComponent,
    TestRecordListComponent,
    TestRecordDetailComponent,
    TestRecordEditComponent,
    TestUnitListComponent,
    TestUnitDetailComponent,
    TestUnitEditComponent
  ],
  providers: []
})
export class TestModule {
}
